<?php
namespace Entities\Corp;

use Doctrine\ORM\Query;
use Doctrine\ORM\EntityRepository;

class PerfilRepository extends EntityRepository
{
	public function listar($params = array(), $notIn = array())
	{
		$dql = "SELECT p FROM Entities\Corp\Perfil p";
		$query = $this->getEntityManager()->createQuery($dql);

		return $query->getResult(Query::HYDRATE_OBJECT);
	}

	public function listCombo($params = array(), $notIn = array())
	{
		$return	= array();
		$lista	= $this->listar($params, $notIn);
		foreach ($lista as $value)
		{
			$return[$value->getId()]	= $value->getNome();
		}
		return $return;
	}
}